<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?>
<div class="layui-warp">
  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=aaf708fdcaf642a6ef668f350611d938&sql=select+a.%2A%2Cb.id%2Cb.pictureurls+from+phpcms_picture+as+a+left+join+phpcms_picture_data+as+b+on+a.id%3Db.id+where+a.status+%3D+99+order+by+inputtime+desc&num=30\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("select a.*,b.id,b.pictureurls from phpcms_picture as a left join phpcms_picture_data as b on a.id=b.id where a.status = 99 order by inputtime desc LIMIT 30");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
  <div id="masonry" class="container-fluid">
    <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
    <div class="layui-box">
      <div class="layui-actions">
        <a class="layui-thumb" href="<?php echo $r['url'];?>" target="_blank"><img lay-src="<?php echo $r['thumb'];?>?x-oss-process=style/midpic" alt="<?php echo $r['title'];?>" /></a>
        <div class="layui-infos">
          <?php $enjoynum = isset($r['digg']) ? $r['digg'] : 0;?>
          <div class="layui-digg"><i class="layui-heart"></i><span class="layui-badge"><?php echo $enjoynum;?>人喜欢</span></div>
          <div class="layui-type"><i class="layui-icon">&#xe857;</i><span class="layui-badge"><a href="<?php echo $CATEGORYS[$r['catid']]['url'];?>" target="_blank"><?php echo $CATEGORYS[$r['catid']]['catname'];?></a></span></div>
        </div>  
      </div>
      <div class="layui-stats">
        <div class="layui-tips">
          <?php $picnum = count(json_decode($r[pictureurls], true));?>
          <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count" data-num="<?php echo $picnum;?>"><?php echo $picnum;?>P</span></div>
          <div class="layui-posttime"><i class="layui-icon">&#xe609;</i><span class="layui-badge layui-date"><?php echo date("Y-m-d", $r[inputtime]);?></span></div>
        </div>
        <div class="layui-title">
          <h2><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><?php echo $r['title'];?></a></h2>
        </div>
      </div>
    </div>
    <?php $n++;}unset($n); ?>
  </div>
  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<div class="layui-link">
  <div class="layui-linkbar">
	<div class="layui-badge"><i class="layui-icon">&#xe64c;</i><h3>友情链接</h3></div>
  </div>
  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=3a91d5f55662d0436cc52f22e86e5877&sql=select+%2A+from+phpcms_link+where+passed%3D1+order+by+listorder%7Caddtime+asc&num=20\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("select * from phpcms_link where passed=1 order by listorder|addtime asc LIMIT 20");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
  <div class="layui-linklist">
  	<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
  	<a href="<?php echo $r['url'];?>" target="_blank"><?php echo $r['name'];?></a>
  	<?php $n++;}unset($n); ?>
  </div>
  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<script type="text/javascript" src="<?php echo LAYUI_PATH;?>index.js"></script>
<script type="text/javascript" src="<?php echo LAYUI_PATH;?>uaredirect.js"></script>
<script type="text/javascript">uaredirect("http://m.chunmeitu.com/");</script>
<?php include template("content","footer"); ?>
